﻿using BusinessLayer;
using BusinessLayer.VDataEntities;
using CustomerServiceCenter.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;

namespace CustomerServiceCenter.Controllers.API
{
    //public class CommonController : ApiController
    //{
        
    //    public string AuthUser(User user) {
    //        VLoginEntity login = new VLoginEntity { UserName = user.username, PassWord = user.password };
    //        VSuperDataEntity User = BusinessLayer.AdminBusiness.Login(login);
    //        if (User != null) {
    //            HttpContext.Current.Session["Admininfo"] = User;
    //            return "success";
    //        }
    //        else {
    //            return "fail";
    //        }
    //    }


    //    public string Timeout() {
    //        return "当前未登录或登录已超时";
    //    }
    //    public string AuthPromoterUser(User user)
    //    {
    //        VPromoter User = PromoterBusiness.ValidatePromoter(user.username,);
    //        if (User != null)
    //        {
    //            HttpContext.Current.Session["PromoterInfo"] = User;
    //            return "success";
    //        }
    //        else
    //        {
    //            return "fail";
    //        }
    //    }

    //}
}
